import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'

import Login from '@/views/Login'
import Register from '@/views/Register'

import PersonalIndex from '@/views/personal/index'
import Edit from '@/views/personal/Edit'
import Follows from '@/views/personal/Follows'

import Test from '@/views/Test'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },

  {
    path: '/login',
    name: 'loginPage',
    component: Login
  },
  {
    path: '/register',
    name: 'registerPage',
    component: Register
  },

  {
    path: '/personal',
    name: 'personalPage',
    component: PersonalIndex,
    meta: {
      auth: true
    }
  },
  {
    path:'/edit',
    name: 'editPage',
    component: Edit,
    meta: {
      auth: true
    }
  },
  {
    path: '/follows',
    name: 'followsPage',
    component: Follows
  },

  {
    path: '/test',
    name: 'testPage',
    component: Test
  }
]

const router = new VueRouter({
  routes
})

export default router
